namespace Management.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class CreateTableReportConfig : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.ReportConfigs",
                c => new
                    {
                        ReportConfigID = c.Int(nullable: false, identity: true),
                        AdminID = c.Int(nullable: false),
                        Config = c.String(),
                        remark = c.String(),
                        Created_at = c.DateTime(nullable: false),
                        Updated_at = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.ReportConfigID)
                .ForeignKey("dbo.Admins", t => t.AdminID, cascadeDelete: true)
                .Index(t => t.AdminID);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.ReportConfigs", "AdminID", "dbo.Admins");
            DropIndex("dbo.ReportConfigs", new[] { "AdminID" });
            DropTable("dbo.ReportConfigs");
        }
    }
}
